<div class="album contract_a wp-20" ui-view="container">
    <div ng-if="!noPermission">
        <div class="head_title">
            <span class="tit-color">合约管理</span>
        </div>
        <div class="searchWapper">
            <!--<div class="form-group searchLump search-condition">
                <div class="searchTitle">搜索：</div>
                <div class="col-lg-3">
                    <div class="input-group input-group-sm" style="margin-left: -10px;">
                        <input type="text" class="form-control input-search" name="keyword" ng-model="keyword" placeholder="搜索">
                            <span class="btn-search">
                                <i class="glyphicon glyphicon-search" ng-click="searchClick(keyword)"></i>
                            </span>
                    </div>
                </div>
            </div>-->
            <div style="clear: both"></div>
            <div class="form-group searchLump">
                <div class="searchTitle">筛选：</div>

                <div class="search-select">
                    <div>
                        <input type="text" style="position: absolute;margin-left: 10px;width: 200px;" uib-datepicker-popup="yyyy-MM-dd" ng-model="$parent.signerDate" ng-change="dateChange(signerDate)" show-weeks="false" is-open="singerDate"  close-text="关闭" clear-text="清除" current-text="今天" placeholder="签署时间" readonly>
                    <span class="input-group-btn calendar_button" style="left: 175px;display: inline-block">
                        <button type="button" class="btn btn-default" ng-click="singerDate=true" style="padding: 4px 10px;top: -2px;border-bottom: 0">
                            <i class="glyphicon glyphicon-calendar"></i>
                        </button>
                    </span>
                        <div style="display: inline-block;margin-left: 216px">
                            <input ims-select-range-time="rangeDate" type="text" placeholder="'合约有效期'">
                        </div>
                        <select ng-model="search.coopType" ng-change="selectChange()" style="margin-left: 21px"
                                ng-options="coopType.key  as coopType.value for coopType in coopTypes">

                        </select>
                        <select ng-model="search.cpProperty" ng-change="selectChange()"
                                ng-options="cpProperty.key  as cpProperty.value for cpProperty in cpPropertyes">
                        </select>
                    </div>
                </div>
            </div>
            <div class="form-group searchLump">
                <div class="searchTitle">操作：</div>
                <div class="search-select">
                    <button class="btn btn-primary" ui-sref="main.contractManagement.add" style="margin-left: 10px">新建</button>
                    <!--<button class="btn btn-primary" ng-click="deleteSelected()">删除</button>-->
                </div>

            </div>
        </div>
        <div style="clear: both"></div>

        <div style="margin:15px  0">
            <table class="table table-bordered table-hover table-page">

                <thead>
                <tr>
                    <!--<th><input type="checkbox" id="allCheckb" class="magic-checkbox" ng-model="$parent.allChecked"-->
                               <!--ng-change="allCheckChange(allChecked)">-->
                        <!--<label for="allCheckb"></label></th>-->
                    <th>合约_ID</th>
                    <th>乙方名称</th>
                    <th>乙方签署人</th>
                    <th>甲方名称</th>
                    <th>甲方签署人</th>
                    <th>CP_昵称</th>
                    <th>性质</th>
                    <th>类型</th>
                    <th>签署日期</th>
                    <th>合约生效期</th>
                    <th>合约失效期</th>
                    <th >操作</th>
                </tr>
                </thead>
                <tbody>
                <tr ng-repeat="contract in contractManagement">

                    <!--<td>-->
                        <!--<input type="checkbox" id="{{$index}}" class="magic-checkbox" ng-model="contract.checked"-->
                               <!--ng-change="itemCheckChange(contract)">-->
                        <!--<label for="{{$index}}"></label>-->
                    <!--</td>-->
                    <td>
                        {{contract.id}}
                    </td>
                    <td>
                        {{contract.partyB}}
                    </td>
                    <td>
                        {{contract.signerB}}
                    </td>
                    <td>
                        {{table[contract.partyA]}}
                    </td>
                    <td>
                        {{contract.signerA}}
                    </td>
                    <td>
                        {{contract.nickName}}
                    </td>
                    <td>
                        {{table[contract.cpProperty]}}
                    </td>
                    <td>
                        {{table[contract.cpType]}}
                    </td>
                    <td>
                        {{contract.singerDate}}
                    </td>
                    <td>
                        {{contract.startDate}}
                    </td>
                    <td>
                        {{contract.endDate}}
                    </td>

                    <td>
                        <a  ui-sref="main.contractManagement.edit({id:contract.id})">编辑</a>
                        <!--<a ng-click="delete(contract)"   class="time-out">删除</a>-->
                    </td>
                </tr>
                </tbody>
            </table>
        </div>
        <div class="panel-footer paging">
            <s-pagination conf="paginationConf"></s-pagination>
        </div>
    </div>

    <div ng-if="noPermission" ng-include="'templates/no-permission.html'">

    </div>
    <!--<a ui-sref="campaigns.detail({campaignsId:1})"  ui-sref-opts="{inherit:false}">aaaaa</a>-->
</div>

